﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterHome.master" AutoEventWireup="true"
    CodeFile="home.aspx.cs" Inherits="home" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script type="text/javascript">

        function slideSwitch() {
            var $active = $('#slideshow IMG.active');

            if ($active.length == 0) $active = $('#slideshow IMG:last');
            var $next = $active.next().length ? $active.next()
        : $('#slideshow IMG:first');

            $active.addClass('last-active');

            $next.css({ opacity: 0.0 })
        .addClass('active')
        .animate({ opacity: 1.0 }, 500, function() {
            $active.removeClass('active last-active');
        });
        }

        $(function() {
            setInterval("slideSwitch()", 4000);
        });

    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="container">
        <div class="heading-big">
            <asp:Label ID="lblTitle" runat="server" Text=""></asp:Label></div>
        <div class="heading-small">
            <asp:Label ID="lblCompareService" runat="server" Text=""></asp:Label></div>
        <div style="width:280px; margin:auto; padding-bottom:10px; padding-top:15px;" id="divPromo" runat="server"
        visible="false">
            <asp:HyperLink ID="hplPromoCarQuote" runat="server" NavigateUrl="">
            <img src="<%=GetGlobalResourceObject("CarMenu", "ImgCNYPromoUrl")%>" width="280" height="280"
            alt="" /></asp:HyperLink>
        </div>
        <div class="icon-box">
            <div class="box-left">
                <div class="box-pad"><asp:Label ID="lblLowPremium" runat="server" Text=""></asp:Label></div>
            </div>
            <div class="box-center">
                <div class="box-pad"><asp:Label ID="lblInsurer" runat="server" Text=""></asp:Label></div>
            </div>
            <div class="box-right">
                <div class="box-pad"><asp:Label ID="lblMoneyBack" runat="server" Text=""></asp:Label></div>
            </div>
        </div>
        <div>
            <asp:Button runat="server" ID="btnGetQuote" CssClass="get-quote-btn" OnClick="btnGetQuote_Click" />
        </div>
        <div class="brands-logo-box">
            <div id="slideshow">
                <img src="images/partners/aig.jpg" width="210" height="70" alt="" class="active" />
                <img src="images/partners/allianz-cp.jpg" width="210" height="70" alt="" />
                <img src="images/partners/asset.jpg" width="210" height="70" alt="" />
                <img src="images/partners/axa.jpg" width="210" height="70" alt="" />
                <img src="images/partners/bki.jpg" width="210" height="70" alt="" />
                <img src="images/partners/deves.jpg" width="210" height="70" alt="" />
                <img src="images/partners/dhipaya.jpg" width="210" height="70" alt="" />
                <img src="images/partners/krungthai.jpg" width="210" height="70" alt="" />
                <img src="images/partners/ksk.jpg" width="210" height="70" alt="" />
                <img src="images/partners/lmg.jpg" width="210" height="70" alt="" />
                <img src="images/partners/mittare.jpg" width="210" height="70" alt="" />
                <img src="images/partners/msig.jpg" width="210" height="70" alt="" />
                <img src="images/partners/muangthai.jpg" width="210" height="70" alt="" />
                <img src="images/partners/thaipaiboon.jpg" width="210" height="70" alt="" />
                <img src="images/partners/scsmg.jpg" width="210" height="70" alt="" />
                <img src="images/partners/thaisri.jpg" width="210" height="70" alt="" />
                <img src="images/partners/synmunkong.jpg" width="210" height="70" alt="" />
                <img src="images/partners/thaivivat.jpg" width="210" height="70" alt="" />
                <img src="images/partners/tokiomarine.jpg" width="210" height="70" alt="" />
                <img src="images/partners/viriyah.jpg" width="210" height="70" alt="" />
            </div>
        </div>
        <div class="call-button">
            <a href="tel:022688222">
                <img src="images/call-button.png" width="225" height="51" alt="" /></a>
        </div>
        <div style="position: absolute; margin: 17px 0px 0px 50px;">
            <img src="images/dog-chac.png" width="53" height="33" alt="" />
        <asp:HiddenField ID="hdnIsPromo" runat="server" Value="0" />
        </div>
        <div class="logo-box">
            <img src="<%=GetGlobalResourceObject("CarMenu", "ImgDBDOICUrl")%>" width="215" height="72"
                alt="" /></div>
        <div class="social-icons">
            <div class="fb-icon">
                <a href="https://www.facebook.com/GGmotor" target="_blank">
                    <img src="images/icons/fb-icon.png" width="53" height="53" alt="" /></a></div>
            <div class="gplus-icon">
                <a href="https://plus.google.com/+Gluaygluay" target="_blank">
                    <img src="images/icons/gplus-icon.png" width="53" height="53" alt="" /></a></div>
            <div class="instagram-icon">
                <a href="http://instagram.com/ggmotor" target="_blank">
                    <img src="images/icons/instagram-variation.png" width="53" height="53" alt="" /></a></div>
            <div class="youtube-icon">
                <a href="http://www.youtube.com/channel/UCZ4gMtlXymBHxvcXO2cR1vA" target="_blank">
                    <img src="images/icons/youtube-variation.png" width="53" height="53" alt="" /></a></div>
        </div>
    </div>
    <script type="text/javascript">
        window.onload = function() {
        var ispromo = document.getElementById('<%= hdnIsPromo.ClientID%>').value;
            if (ispromo == "1") {
                $('.box-left').css("background-image", "url(images/icons/low-prices-cny.png)");
                $('.box-center').css("background-image", "url(images/icons/motor-insurer-cny.png)");
                $('.box-right').css("background-image", "url(images/icons/money-back-cny.png)");
            }
        }
    </script>
</asp:Content>
